package com.fudan.gamestore.pojo;

public class OrderItem {
    private Integer orderItemId;
    private Integer orderId;
    private Integer gameId;
    private Game game;

    public OrderItem() {
    }

    public OrderItem(Integer orderItemId, Integer orderId, Integer gameId, Game game) {
        this.orderItemId = orderItemId;
        this.orderId = orderId;
        this.gameId = gameId;
        this.game = game;
    }

    public OrderItem(Integer orderId, Integer gameId) {
        this.orderItemId = null;
        this.orderId = orderId;
        this.gameId = gameId;
        this.game = null;
    }

    public Integer getOrderItemId() {
        return orderItemId;
    }

    public void setOrderItemId(Integer orderItemId) {
        this.orderItemId = orderItemId;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public Integer getGameId() {
        return gameId;
    }

    public void setGameId(Integer gameId) {
        this.gameId = gameId;
    }

    public Game getGame() {
        return game;
    }

    public void setGame(Game game) {
        this.game = game;
    }

    @Override
    public String toString() {
        return "OrderItem{" +
                "orderItemId=" + orderItemId +
                ", orderId=" + orderId +
                ", gameId=" + gameId +
                ", game=" + game +
                '}';
    }
}
